package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ComplaintEncloaureMapper;
import com.ruoyi.system.domain.ComplaintEncloaure;
import com.ruoyi.system.service.IComplaintEncloaureService;

/**
 * 投诉附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-22
 */
@Service
public class ComplaintEncloaureServiceImpl implements IComplaintEncloaureService 
{
    @Autowired
    private ComplaintEncloaureMapper complaintEncloaureMapper;

    /**
     * 查询投诉附件
     * 
     * @param coeId 投诉附件ID
     * @return 投诉附件
     */
    @Override
    public ComplaintEncloaure selectComplaintEncloaureById(Long coeId)
    {
        return complaintEncloaureMapper.selectComplaintEncloaureById(coeId);
    }

    /**
     * 查询投诉附件列表
     * 
     * @param complaintEncloaure 投诉附件
     * @return 投诉附件
     */
    @Override
    public List<ComplaintEncloaure> selectComplaintEncloaureList(ComplaintEncloaure complaintEncloaure)
    {
        return complaintEncloaureMapper.selectComplaintEncloaureList(complaintEncloaure);
    }

    /**
     * 新增投诉附件
     * 
     * @param complaintEncloaure 投诉附件
     * @return 结果
     */
    @Override
    public int insertComplaintEncloaure(ComplaintEncloaure complaintEncloaure)
    {complaintEncloaure.setCreateTime(DateUtils.getNowDate());
        return complaintEncloaureMapper.insertComplaintEncloaure(complaintEncloaure);
    }

    /**
     * 修改投诉附件
     * 
     * @param complaintEncloaure 投诉附件
     * @return 结果
     */
    @Override
    public int updateComplaintEncloaure(ComplaintEncloaure complaintEncloaure)
    {complaintEncloaure.setUpdateTime(DateUtils.getNowDate());
        return complaintEncloaureMapper.updateComplaintEncloaure(complaintEncloaure);
    }

    /**
     * 批量删除投诉附件
     * 
     * @param coeIds 需要删除的投诉附件ID
     * @return 结果
     */
    @Override
    public int deleteComplaintEncloaureByIds(Long[] coeIds)
    {
        return complaintEncloaureMapper.deleteComplaintEncloaureByIds(coeIds);
    }

    /**
     * 删除投诉附件信息
     * 
     * @param coeId 投诉附件ID
     * @return 结果
     */
    @Override
    public int deleteComplaintEncloaureById(Long coeId)
    {
        return complaintEncloaureMapper.deleteComplaintEncloaureById(coeId);
    }
}
